/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import org.hibernate.Criteria;
import org.orm.PersistentException;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class SucursalCriteria extends AbstractORMCriteria {
	public final IntegerExpression idSucursal;
	public final StringExpression nombreSucursal;
	public final StringExpression direccionComercial;
	public final StringExpression fono;
	public final IntegerExpression coordenada1;
	public final IntegerExpression coordenada2;
	
	public SucursalCriteria(Criteria criteria) {
		super(criteria);
		idSucursal = new IntegerExpression("idSucursal", this);
		nombreSucursal = new StringExpression("nombreSucursal", this);
		direccionComercial = new StringExpression("direccionComercial", this);
		fono = new StringExpression("fono", this);
		coordenada1 = new IntegerExpression("coordenada1", this);
		coordenada2 = new IntegerExpression("coordenada2", this);
	}
	
	public SucursalCriteria(PersistentSession session) {
		this(session.createCriteria(Sucursal.class));
	}
	
	public SucursalCriteria() throws PersistentException {
		this(orm.MarketFrogPersistentManager.instance().getSession());
	}
	
	public TiendaCriteria createTiendaidTiendaCriteria() {
		return new TiendaCriteria(createCriteria("tiendaidTienda"));
	}
	
	public ProductoCriteria createProductoCriteria() {
		return new ProductoCriteria(createCriteria("ORM_Producto"));
	}
	
	public Sucursal uniqueSucursal() {
		return (Sucursal) super.uniqueResult();
	}
	
	public Sucursal[] listSucursal() {
		java.util.List list = super.list();
		return (Sucursal[]) list.toArray(new Sucursal[list.size()]);
	}
}

